﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace _395_2d
{
    class GameOverScreen : DrawableGameComponent
    {
        private SpriteBatch spriteBatch;
        private Texture2D screen;

        public GameOverScreen(Game game, GameOverMessage gom, int i)
            : base(game)
        {
            if (gom.isWin())
                screen = Game.Content.Load<Texture2D>("Win");
            else
                screen = Game.Content.Load<Texture2D>("Fail");
        }

        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(this.Game.GraphicsDevice);

            base.LoadContent();
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
            spriteBatch.Begin();
            spriteBatch.Draw(screen, new Vector2(0, 0), Color.White);
            spriteBatch.End();
        }
    }
}
